/**
 * ____________________ *
 *  ____ ____ ____ _  _ *
 *  |___ [__] |--< |\/| *
 * ____________________ *
 *
 * THE CORM PROJECT
 *
 * This file may only be used in accordance with the
 * terms of the Academic Free License ("AFL") v. 3.0,
 * as published by the Open Software Initiative.  A
 * copy of this license is provided in this source
 * release, and may be viewed online at:
 *
 * (http://www.opensource.org/licenses/afl-3.0.php)
 */
package org.eremite.corm.product;

import org.eremite.corm.Archetype;
import org.jscience.physics.amount.Amount;
import org.jscience.economics.money.Money;

import javax.measure.quantity.Quantity;
import java.util.Date;

/**
 * Prices can only exist within the context of a
 * set of pricing rules, currencies, and
 * product relationships.  Thus, it is unnatural
 * for any given ProductInstance or ProductType
 * to contain information about its price.
 *
 * Rather than that, price is an external
 * condition
 */
public class Price<Q extends Quantity> extends Archetype {
    private Amount<Q> amount;
    private Date validFrom;
    private Date validTo;

    public Amount<Q> getAmount() {
        return amount;
    }

    public void setAmount(Amount<Q> amount) {
        this.amount = amount;
    }

    public Date getValidFrom() {
        return validFrom;
    }

    public void setValidFrom(Date validFrom) {
        this.validFrom = validFrom;
    }

    public Date getValidTo() {
        return validTo;
    }

    public void setValidTo(Date validTo) {
        this.validTo = validTo;
    }
}
